Skip to content
This repository was archived by the owner on May 5, 2026. It is now read-only.

Add forwardWithCallback#169

Closed
pedrorfernandes wants to merge 6 commits intomock-server:masterfrom
pedrorfernandes:master
Closed

Add forwardWithCallback#169
pedrorfernandes wants to merge 6 commits intomock-server:masterfrom
pedrorfernandes:master

Conversation

@pedrorfernandes
Copy link
Copy Markdown

I've created forwardWithCallback() in the style of mockWithCallback(), tried to make as minimal change as possible, could reuse some of the code in createExpectationWithCallback but opted to keep it all separate

The only difference in contract with mockWithCallback() is the requestAndResponseHandler, which if present triggers responseCallback: true. Don't know if there are other scenarios other than replying an HttpRequest and then a HttpResponse to the websocket but I can implement them if needed

If approach is approved I can look into testing and later updating the docs for the javascript example

@pedrorfernandes
Copy link
Copy Markdown
Author

missing implementation in WebSocketClient at mockServerClient.js

@pedrorfernandes
Copy link
Copy Markdown
Author

@jamesdbloom is it possible to merge and release this?

@jamesdbloom
Copy link
Copy Markdown
Collaborator

Thank you for this contribution @pedrorfernandes! As part of consolidating MockServer into a monorepo, we're deferring feature PRs that need additional review, testing, and documentation. We'd love to have this forwardWithCallback feature - would you be willing to re-submit this PR against the monorepo at https://github.com/mock-server/mockserver once the consolidation is complete? We're happy to work with you on getting tests and documentation added. The monorepo migration is currently in progress.

@jamesdbloom
Copy link
Copy Markdown
Collaborator

Tracking issue created: mock-server/mockserver-monorepo#2049

This feature request is now tracked in the main monorepo. Feel free to contribute there once the monorepo consolidation is complete!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants